Skip to content

routerclient: add payment request route fee estimates#273

Merged
hieblmi merged 1 commit into
lightninglabs:masterfrom
hieblmi:upgrade-estimate-route-fee
Jun 15, 2026
Merged

routerclient: add payment request route fee estimates#273
hieblmi merged 1 commit into
lightninglabs:masterfrom
hieblmi:upgrade-estimate-route-fee

Conversation

@hieblmi

@hieblmi hieblmi commented May 4, 2026

Copy link
Copy Markdown
Contributor
  • Add EstimateRouteFeeWithPaymentRequest for payment-request probing through LND's EstimateRouteFee RPC:
    • payment-request probing via PaymentRequest
    • probe timeout via Timeout
  • Add EstimateRouteFeeResponse so callers can access RoutingFee, TimeLockDelay, and FailureReason for probe estimates.
  • Keep the existing EstimateRouteFee(ctx, dest, amt) method as the graph-based route-fee API without deprecating it.
  • Update macaroon recipe method mapping so the new method maps to the existing /routerrpc.Router/EstimateRouteFee permission.
  • Add unit tests for graph estimates, payment-request probe estimates, and timeout validation.

@hieblmi hieblmi requested a review from starius May 4, 2026 08:57
@starius

starius commented May 18, 2026

Copy link
Copy Markdown
Contributor

EstimateRouteFeeWithRequest is oneof (old EstimateRouteFee , PaymentRequest + Timeout).

Wouldn't it be better to add another method for the PaymentRequest + Timeout variant and avoid EstimateRouteFee deprecation? Given the new method is split between these two variants anyway.

@lightninglabs-deploy

Copy link
Copy Markdown

@starius: review reminder

@hieblmi hieblmi force-pushed the upgrade-estimate-route-fee branch from 7271891 to b1dfe55 Compare June 3, 2026 13:53
@hieblmi hieblmi changed the title routerclient: add EstimateRouteFeeWithRequest and deprecate EstimateRouteFee routerclient: add payment request route fee estimates Jun 3, 2026
@hieblmi hieblmi force-pushed the upgrade-estimate-route-fee branch from b1dfe55 to 767763e Compare June 3, 2026 21:47
@hieblmi

hieblmi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @starius, this makes sense. I created

estimateRouteFee(ctx context.Context,
	rpcReq *routerrpc.RouteFeeRequest) (*EstimateRouteFeeResponse, error)

which is called by old and new method.

@starius starius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉
I have one naming proposal and also found some small issues.

Comment thread router_client.go Outdated
Comment thread router_client.go
Comment thread router_client.go Outdated
Comment thread router_client.go
Comment thread router_client.go Outdated
Comment thread router_client.go Outdated
Comment thread router_client_test.go Outdated
Comment thread router_client_test.go Outdated
@hieblmi hieblmi force-pushed the upgrade-estimate-route-fee branch from 767763e to 62beb9f Compare June 15, 2026 09:27
@hieblmi hieblmi force-pushed the upgrade-estimate-route-fee branch from 62beb9f to bde6490 Compare June 15, 2026 09:36
@hieblmi hieblmi merged commit 618be70 into lightninglabs:master Jun 15, 2026
1 check passed
@hieblmi hieblmi deleted the upgrade-estimate-route-fee branch June 15, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants